<?php if ($this->box->getData('reviewCount/' . $this->box->productId)) : ?>
    <p class="review-view">
        <a href="<?php echo $this->href('review/product/') . $this->box->productUrl ?>"
            title="<?php echo $this->translate('community')->__("View all user reviews (%d)", 
                $this->box->getData('reviewCount/'.$this->box->productId)
            ) ?>">
            <?php echo $this->translate('community')->__("View all user reviews (%d)", 
                $this->box->getData('reviewCount/'.$this->box->productId)
            ) ?>
        </a></p>
    <?php if ($this->box->hasData('ratings/'.$this->box->productId)) : ?>
        <?php echo $this->ratings(
            $this->box->getData('ratings/'.$this->box->productId), 
            $this->href('review/product/' . $this->box->productUrl), 
            $this->box->hasData('smallStars') && $this->box->getData('smallStars')
        ) ?>
    <?php endif; ?>
<?php else: ?>
    <p class="review-add">
        <a href="<?php echo $this->href('review/add/product/') . $this->box->productId ?>"
            rel="nofollow">
            <?php echo $this->translate('community')->__('Be the first to review this product') ?>
        </a></p>
<?php endif; ?>